package com.decent.ejfadmin.order.dao.provider;


import java.util.HashMap;

/**
 * 销卡订单sql管理
 *
 * @author 王元鑫
 * @date 2016/8/18
 */
public class CardSupplyOrderDaoProvider {

    /**
     * 查询批次信息
     *
     * @param map 参数
     * @return 返回sql语句
     */
    public String queryBatchStatusOrders(HashMap<String, Object> map) {
        StringBuilder sql = new StringBuilder(100);
        Object productType = map.get("productType");
        sql.append("select count(1) from yuhuang_supply_card  where batchId = #{batchId} ");

        if (productType != null && !Integer.valueOf(0).equals((Integer) productType)) {
            sql.append(" and productType = #{productType} ");
        }

        sql.append(" and status in (0,3,8) ");

        return sql.toString();
    }




}
